<template>
  <div class="dashboard-container">
    <h2>作用域插槽</h2>
    <hr>
    <!--  -->
    <ShowName first-name="tom" last-name="green" />
    <ShowName first-name="王" last-name="小明">
      <template #default="aaa">
        {{ aaa.info.fname +' '+aaa.info.lname }}
        <br>
        <button @click="handle(aaa)">按钮</button>
      </template>
    </ShowName>
  </div>
</template>

<script>
// import { mapGetters } from 'vuex'
import ShowName from './components/ShowName.vue'
export default {
  name: 'Dashboard',
  components: {
    ShowName
  },
  methods: {
    handle (val) {
      console.log(val);
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
.eye-cls {
  color: aqua;
}
</style>
